<?php
/**
 * @author Nguyễn Sơn Tùng <sontung.x305@gmail.com> <YM :terminator_nst>
 * @version 1.0
 * @copyright fteam.vn
 * Date: 23/04/2012
 * Time: 15:34
 */

return CMap::mergeArray(
    require(COMMON_FOLDER.'/configs/globals.config.php'),
    array(
        'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
        'name' => 'FCMS BACKEND ZONE',
        'defaultController'=>'fsite',
        'homeUrl'=>array('/fsite/login'),
        'components'=>array(

            //Error Action when having Errors
            'errorHandler'=>array(
                // use 'site/error' action to display errors
                'errorAction'=>'fsite/error',
            ),

            //User Componenets
            'user'=>array(
                'class'=>'common.components.user.FUser',
                // enable cookie-based authentication
                'allowAutoLogin'=>true,
                'authTimeout'=>3600, // Timeout in seconds after which user is logged out if inactive
                'loginUrl'=>array('/fsite/login'),
                'stateKeyPrefix'=>'fcms_state_backend',
            ),
            // URL Format and Rewrite
            'urlManager'=>array(
                'urlFormat'=>'path',
                'showScriptName' =>false,
                'rules'=>require(dirname(__FILE__).'/urls.php'),
                'showScriptName'=>false, // Remove index.php in URL
            ),
            'themeManager'=>array(
                'basePath'=>dirname(dirname(__FILE__)).'/themes'
            ),

        ),
        'import'=>array(
            'backend.extensions.giix-components.*',
        ),
        'modules'=>array(
            // uncomment the following to enable the Gii tool
            'gii'=>array(
                'class'=>'system.gii.GiiModule',
                'password'=>'123456',
                // If removed, Gii defaults to localhost only. Edit carefully to taste.
                'ipFilters'=>array('127.0.0.1','::1'),
                'generatorPaths' => array(
                    'common.extensions.bootstrap.gii',
                    'backend.extensions.giix-core'
                ),
            ),
            'apcinfo'
        ),
        'theme'=>'fcms',
    )
);
